import request from '@/http'
import { get, post } from '@/http'
import config from '@/http/config'

console.log(config)
const api = `${config.account.ip}/api/accountmgt`
const apiAssist = `${config.assist.ip}/api/assist`
const apiView = `${config.view.ip}/api/view`



/*
* 详览正文内容
* method：post
* params:{}
* dataSource-类型,juedingh-决定号,anjianbh-案件编号
* */
export const getInfo = (data) => request({
  url: `${apiView}/details/info`,
  method: 'post',
  data
})
/*
* 取消点赞
* method：post
* params:{}
* anjianbh-案件编号,juedingh-决定号, anjianlx-案件类型
* */
export const cancelLike = (data) => request({
  url: `${api}/personalLike/cancel`,
  method: 'post',
  data
})

/*
* 获取案件点赞次数
* method：get
* params:{}
* anjianbh-案件编号,juedingh-决定号, anjianlx-案件类型
* */
// export const getNumberLikes = (params) => request({
//   url: `${api}/personalLike/numberLikes`,
//   method: 'get',
//   params
// })
export function getNumberLikes(params) {
	return get(`${api}/personalLike/numberLikes`,params)
}

/*
* 添加个人点赞
* method：post
* params:{}
* anjianbh-案件编号,juedingh-决定号, anjianlx-案件类型
* */
export const addLikes = (data) => request({
  url: `${api}/personalLike/add`,
  method: 'post',
  data
})


// 管理页面
/*
* 已审案件
* method：post
* params:{}
* */
export const haveCases = (data) => request({
  url: `${api}/personalReviewed/list`,
  method: 'post',
  data
})

/*
* 标注案件
* method：get
* params:{}
* */
// export const lableCases = (data) => request({
//   url:`${api}/personalLables/showPersonalLables`,
//   method:'get',
//   data
// })
export function lableCases(params) {
  return get(`${api}/personalLables/showPersonalLables`, params)
}
//查询我的标注
// export const queryCaseLables = (data) => request({
//   url:`${api}/personalLables/queryCaseLables`,
//   method:'get',
//   data
// })
export function queryCaseLables(params) {
  return get(`${api}/personalLables/queryCaseLables`, params)
}
//编辑保存标注
export const editSingleLables = (data) => request({
  url: `${api}/personalLables/editSingleLables`,
  method: 'post',
  data
})
//删除标注
export const deleteCaseLables = (data) => request({
  url: `${api}/personalLables/deleteCaseLables`,
  method: 'post',
  data
})
//删除单个标注
export const deleteSingleLables = (data) => request({
  url: `${api}/personalLables/deleteSingleLables`,
  method: 'post',
  data
})
//导出单个标注
// export const exportLableList = (data) => request({
//   url:`${api}/personalLables/exportLableList`,
//   method:'get',
//   data
// })

//新建主题名称
export const createClassifiedTopics = (data) => request({
  url: `${api}/personalLables/createClassifiedTopics`,
  method: 'post',
  data
})
/*
* 点赞案件
* method：post
* params:{}
* */
//个人点赞-点赞案件列表
export const personalLikeCases = (data) => request({
  url: `${api}/personalLike/list`,
  method: 'post',
  data
})
//个人点赞-取消点赞
export const personalLikeCancelCases = (data) => request({
  url: `${api}/personalLike/cancel`,
  method: 'post',
  data
})
//个人点赞-获取案件点赞次数
export const personalNumberLikes = (data) => request({
  url: `${api}/personalLike/numberLikes`,
  method: 'post',
  data
})
//添加个人点赞
export const personalAddLikes = (data) => request({
  url: `${api}/personalLike/add`,
  method: 'post',
  data
})
/*
* 系统帮助
* method：post
* params:{}
* dataSource-类型,juedingh-决定号,anjianbh-案件编号
* */
// export const downloadCenterList = (data) => request({
//   url:`${apiAssist}/downloadCenter/list`,
//   method:'get',
//   data
// })
export function downloadCenterList() {
  return get(`${apiAssist}/downloadCenter/list`, {})
}
// 案件对比

export const contrastCases = (data) => request({
  url: `${apiView}/contrast/details`,
  method: 'post',
  data
})
//处室案例统计
export function departmentStatistics() {
  return get(`${apiAssist}/departmentStatistics/list`, {})
}
// // 处室案例统计
// export const departmentStatistics= (data) => request({
//   url:`${apiAssist}/departmentStatistics/list`,
//   method:'get',
//   data
// })


